package cn.iocoder.yudao.module.nginxui.controller.admin.httplocation.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;

@Schema(description = "管理后台 - Nginx Server下的Location块配置新增/修改 Request VO")
@Data
public class HttpLocationSaveReqVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2956")
    private Long id;

    @Schema(description = "server配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13878")
    @NotNull(message = "server配置ID不能为空")
    private Long serverId;

    @Schema(description = "匹配路径", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "匹配路径不能为空")
    private String path;

    @Schema(description = "Location根目录")
    private String root;

    @Schema(description = "反向代理地址")
    private String proxyPass;

    @Schema(description = "尝试文件")
    private String tryFiles;

    @Schema(description = "重写规则")
    private String rewrite;

    @Schema(description = "允许访问的IP")
    private String allow;

    @Schema(description = "禁止访问的IP")
    private String deny;

    @Schema(description = "Location块额外自定义配置")
    private String extraLocationConfig;

    @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "排序号不能为空")
    private Integer sort;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "状态不能为空")
    private Integer status;

}